import requests
import time
import sys


def main(arg):
    while True:
        time.sleep(float(arg))
        url = "http://127.0.0.1:58000/resource"
        body = {
            "dag_id": 1,
            "name": "task_test"
        }
        res = requests.post(url=url, json=body)
        print(res)

if __name__ == '__main__':
    main(sys.argv[1])